package com.lznAdmin.properties;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @program: lzn-manage-parent
 * @description: AuthenticationProperties
 * @author: lzn
 * @create: 2021-07-26 16:50
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AuthenticationProperties {
    // application.yml 没配置取默认值
    private String loginPage = "/login";
    private String loginProcessingUrl = "/doLogin";
    private String usernameParameter = "username";
    private String passwordParameter = "password";
    private String[] staticPaths = {};

    /**
     * 登录成功后响应 JSON , 还是重定向
     * 如果application.yml 中没有配置，则取此初始值 REDIRECT
     */
    private LoginResponseType loginType = LoginResponseType.REDIRECT;

    /**
     * 获取图形验证码url
     */
    private String imageCodeUrl = "/code/image";

    /**
     * 记住我有效时长
     */
    private Integer tokenValiditySeconds = 60 * 60 * 24 * 7;
}
